Repository navigation
Fix empty and root prefixes in PrefixFileSystem, glob, and StdFileSystem - #12198
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
roborev: Combined Review (
|
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
I reviewed aa9859d. The PrefixFileSystem fix is correct, and replacing the sleep and yield_now waits in the vortex-io tests with deterministic stepping is worth having: SimulatedExecutor::drive alone has about 100 callers. The production changes outside prefix.rs keep their behaviour: default_read_ranges is the old trait default moved into a function, and the pool changes add only #[cfg(test)] fields and notifications.
At 2,952 added lines for a one-function fix, the harness is larger than its callers need. Three cuts would bring it closer to proportion without losing any of the deterministic tests:
- Drop the
_test-harnessfeature and thepub mod. No other crate enablesvortex-io/_test-harnessor importsvortex_io::test_harness, although the module doc says it is for downstream crates.#[cfg(test)] mod test_harnesswithpub(crate)items is enough today, and a feature can be added when a second crate needs it. - Remove the API that nothing calls. Outside the harness itself, nothing uses
SimulatedExecutor::step,SimulatedExecutor::pending_task_count, eitherwith_seed,complete_with,complete_last,cancelled_readsorReadFault::ShortRead. - Trim the harness self-tests.
executor.rsandread_at.rscarry 9 tests of the test code, about 250 lines. Once the unused API is gone, keep only the ones that pin behaviour other tests depend on, such as the deterministic ordering for a seed and fault injection.
The new compat, StdFileSystem and SharedSegmentSource tests are outside what the title describes, but the description now gives the reason, so I would keep them.
|
Addressed all three points in 71b3815:
Updated the PR description to match. |
Merging this PR will not alter performanceWarning vortex-data has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed. 2 warnings
Comparing Footnotes
|
robert3005
left a comment
There was a problem hiding this comment.
I found a local filesystem regression and an error path where the simulated reader panics.
— Codex (OpenAI)
robert3005
left a comment
There was a problem hiding this comment.
The updated code handles bare relative globs and returns UnexpectedEof for out-of-range simulated reads. One related absolute-path case remains.
— Codex (OpenAI)
robert3005
left a comment
There was a problem hiding this comment.
9872a5bf2 addresses my previous root-prefix finding. I found one more difference in the files selected by the new absolute-glob case.
— Codex (OpenAI)
|
This is a massive pr, I wonder if we can make it more reviewable. I wonder if we can somehow compress the harness test coverage and make sure they're minimal |
|
Compressed the harness and new test suites in
|
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
I reviewed 4430300 again for size, after the trim in d0ca2fd. The fix is correct, but the PR is still much larger than its problem.
The PrefixFileSystem and glob fix is about 32 production lines in prefix.rs, glob.rs and std_file/filesystem.rs. The runtime changes add about 50 more lines, mostly test-only join handles. The harness and tests add about 2,000 lines and remove about 220.
The largest single part is vortex-io/src/compat/tests.rs: 510 lines for 3 tests. Most of it is hand-written mocks of ObjectStore, FileSystem and the writer traits. The compat layer is not changed by this PR, and no test there covers the prefix fix. Please drop that file from this PR. That removes about a quarter of the added lines.
The rest is in proportion. The harness replaces 171 lines of hand-rolled mocks in segments/file.rs, and the SharedSegmentSource tests show what it is for. The fix itself gets focused tests in prefix.rs, glob.rs and std_file/filesystem.rs.
|
Dropped |
Signed-off-by: Will Manning <will@willmanning.io>
5f2852d to
012c424
Compare
|
Trimmed this PR down to just the 3-file empty/root prefix fix ( |
robert3005
left a comment
There was a problem hiding this comment.
The glob separator behavior has a follow-up in #12302. The filesystem-root regression still applies at this head. With StdFileSystem::with_prefix("/"), head("data/file") now looks under the working directory. An explicit / needs to keep resolving from the filesystem root, while with_prefix("") should keep relative paths relative. A recording filesystem could check the exact delegated keys for both prefixes without depending on the host filesystem. Existing root-prefix thread
The replacement commit 012c42414c has a matching human author and sign-off, so the earlier DCO comment is addressed.
— Codex (OpenAI)
|
trim the tests otherwise 👍 |
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
|
Fixed the |
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
PrefixFileSystem::newpreviously turned an empty prefix into"/", prepending a stray leading slash to every delegated key; it now keeps""empty while preserving"/"for explicit root prefixes,globpreserves a root"/"listing prefix for root-level absolute patterns, andStdFileSystem::list("")walks"."with the leading"."stripped so relative listings matchhead. Broader cross-binding glob normalization is tracked in #12302.Assisted by Antigravity.